﻿@page
@model AdminUI.Pages.Dialog.SelectAreaModel
@{
    var F = Html.F();
}

@section body {

    <f:SimpleForm ID="SimpleForm1" LabelAlign="Top" ShowBorder="false" ShowHeader="false" Title="SimpleForm" BodyPadding="10" EnableCollapse="false" AutoScroll="true" IsViewPort="true">
        <Items>
            <f:Tree ID="Tree1" IsFluid="true" MinHeight="400" ShowHeader="false" ShowBorder="false" EnableSingleExpand="true" EnableSingleClickExpand="false" 
                    Nodes="@(TreeNode[])ViewBag.TreeNodeData" TitleToolTip="双击选择" HeaderStyle="false">
                <Listeners>
                    <f:Listener Event="nodedblclick" Handler="onTree1NodeClick"></f:Listener>
                </Listeners>
            </f:Tree>
        </Items>
    </f:SimpleForm>

}


@section script {

    <script>
        function onTree1NodeClick(event, nodeId) {
            var tree = this;
            var nodeData = tree.getNodeData(nodeId);

            var activeWindow = F.getActiveWindow();
            activeWindow.hide();
            activeWindow.window.updateTreeSelectValue(nodeData);
        }

    </script>
}